<#import "/spring.ftl" as spring/>
<#import "/common/popbase.ftl" as base/>
<@base.page  "商品选则">
<style>
.goodsinfo{width: 100%;height: 34px;padding: 6px 12px;font-size: 14px;line-height: 1.42857143;color: #555;background-color: #fff;background-image: none;border: 1px solid #ccc;border-radius: 4px;}
</style>
<div ng-controller="goodsSelectController">
	<div class="ibox float-e-margins">
		<div class="ibox-content">
			<div id="DataTables_Table_0_wrapper" class="dataTables_wrapper form-inline" role="grid">
				<div class="row">
					<div class="col-sm-12">
						<div id="DataTables_Table_0_filter" >
							<div class="">
							    <label>货号&nbsp;&nbsp;</label><input type="text" ng-model="sku" name="sku" style="width:100px" class="goodsinfo">
								<label>条形码&nbsp;&nbsp;</label><input type="text" ng-model="barcode" name="barcode" style="width:100px" class="goodsinfo">
								<label>商品名称&nbsp;&nbsp;</label><input type="text" ng-model="goodsName" name="goodsName" style="width:100px" class="goodsinfo">&nbsp;&nbsp;&nbsp;
								<button class="btn btn-primary" ng-click="Search()">查询</button>
							</div>
						</div>
					</div>
				</div>
				<table id="datatable" class="table table-striped table-bordered table-hover dataTables-example dataTable" style="width:100%">
					<thead>
						<tr>
							<th></th>
							<th>货号</th>
							<th>条形码</th>
							<th>商品名称 </th>
							<th>税率</th>
							<th>箱规</th>
							<th>销售价</th>
							<th>在库成本价</th>
						</tr>
					</thead>
					<tbody>
						<tr ng-repeat="goods in goodsList" ng-dblclick="dbc($index)">
							<td><input type="checkbox" ng-model="goods.IsSelected" ng-click="sel($index);"/></td>
							<td>{{goods.sku}}</td>
							<td>{{goods.barcode}}</td>
							<td>{{goods.goodsName}}</td>
							<td>{{goods.tax}}</td>
							<td>{{goods.packing}}</td>
							<td>{{goods.salePrice}}</td>
							<td>{{goods.costPrice}}</td>
						</tr>
						<tr>
							<td colspan="8" class="text-center">
								<nav>
									<ul class="pagination">
										<li>
											<a href="javascript:void(0);" aria-label="Previous" ng-click="GotoPage(CurrentPage-1)"><span aria-hidden="true">上一页</span></a>
										</li>
										<li ng-click="GotoPage(page)" href="javascript:void(0);" ng-repeat="page in ShowPages">
											<a href="javascript:void(0);">{{page}}</a>
										</li>
										<li>
											<a href="javascript:void(0);" aria-label="Next" ng-click="GotoPage(CurrentPage+1)"><span aria-hidden="true">下一页</span></a>
										</li>
									</ul>
									<b><span style="padding: 30px 19px 14px 20px;position: absolute;">第 {{CurrentPage}} 页 {{RecordCount}} 条</span></b>
								</nav>
							</td>
						</tr>
					</tbody>
				</table>
				<table style="width:100%; margin-top:-5px">
		            <tr>
		                <td align="center">
		                    <button type="button" class="btn btn-primary" id="btnOk" ng-click="confirm()">提交</button>&nbsp;&nbsp;
		                    <button type="button" class="btn btn-primary" id="btnCancel" ng-click="cancel()">关闭</button>
		                </td>
		            </tr>
	        	</table>
			</div>
		</div>
	</div>
</div>
<script src="<@spring.url '/assets/pagejs/selectGoods/goods.js' />"></script>
</@base.page>
